package com.gc.server.vo.down;


import lombok.Data;

import java.util.Date;

import com.alibaba.excel.annotation.*;

import java.io.Serializable;


import com.gc.server.entity.SaleRecordEntity;
import com.gc.server.vo.SaleRecordVo;


/**
 * 销量实体
 * 表名 sale_record
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date ${datetime}
 */
@Data
public class SaleRecordDown implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

    //
    @ExcelProperty("")
    private Long id;

    @ExcelProperty("店铺名")
    private String shopName;

    @ExcelProperty("店铺编号")
    private String shopCode;

    @ExcelProperty("产品名")
    private String goodsName;

    @ExcelProperty("产品编号")
    private String goodsCode;

    @ExcelProperty("产品单位")
    private String goodsSpec;

    //时间
    @ExcelProperty("时间")
    private Date time;

    //数量
    @ExcelProperty("数量")
    private Integer amount;


    public SaleRecordDown() {

    }

    public SaleRecordDown(SaleRecordVo vo) {
        SaleRecordEntity entity = vo.getEntity();
        this.setId(entity.getId());

        this.setGoodsCode(vo.getGoods().getCode());

        this.setGoodsName(vo.getGoods().getName());

        this.setShopCode(vo.getShop().getCode());

        this.setShopName(vo.getShop().getShopName());

        this.setAmount(entity.getAmount());

        this.setTime(entity.getTime());

        this.setAmount(entity.getAmount());
        this.setGoodsSpec(vo.getGoods().getSpec());

    }


}
